const settings = {
  state: {
    isFixedHeader: false, // 是否固定顶部
    isTopNav: false, // 是否顶部导航+侧栏
    isShowLogo: true // 是否显示logo
  },

  getters: {
    isFixedHeader: (state)=> state.isFixedHeader,
    isTopNav: (state)=> state.isTopNav,
    isShowLogo: (state)=> state.isShowLogo,
  },

  mutations: {
    CHANGE_TOP_NAV: (state, flag) => {
      state.isTopNav = flag
    },
    CHANGE_FIXED_HEADER: (state, flag) => {
      state.isFixedHeader = flag
    },
    CHANGE_LOGO_STATUS: (state, status)=>{
      state.isShowLogo = status
    }
  },
  actions: {
    // 改变顶部菜单导航
    changeTopNav({ commit }, flag) {
      commit('CHANGE_TOP_NAV', flag)
    },

    // 是否固定顶部栏
    changeFixedHeader({ commit }, flag) {
      commit('CHANGE_FIXED_HEADER', flag)
    },

  }
}

export default {namespaced: true,...settings}